USE [RD_DWCR]
GO

/****** Object:  Table [dbo].[JDEABAddressBookMaster]    Script Date: 7/21/2015 9:36:28 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO



CREATE TABLE YCDEV.[JDEABAddressBookMasterYCHOI](
	[SourceID] [int] NOT NULL,
	[Source] [nchar](40) NOT NULL,
	[AddressNumber] [int] NOT NULL,
	[LongAddressNumber] [nchar](40) NOT NULL,
	[TaxID] [nchar](40) NOT NULL,
	[AlphaName] [nchar](80) NOT NULL,
	[DescriptionCompressed] [nchar](80) NOT NULL,
	[BusinessUnitCode] [nchar](24) NOT NULL,
	[StandardIndustryCode] [nchar](20) NOT NULL,
	[LanguagePreferenceCode] [nchar](4) NOT NULL,
	[LanguagePreference] [nchar](60) NOT NULL,
	[SearchTypeCode] [nchar](6) NOT NULL,
	[SearchType] [nchar](60) NOT NULL,
	[CreditMessageCode] [nchar](4) NOT NULL,
	[CreditMessage] [nchar](60) NOT NULL,
	[PersonCorpTaxpayerCode] [nchar](2) NOT NULL,
	[ARAPNetting] [nchar](2) NOT NULL,
	[AddressType3YN] [nchar](2) NOT NULL,
	[AddressType4YN] [nchar](2) NOT NULL,
	[AddressType5YN] [nchar](2) NOT NULL,
	[Payables] [nchar](2) NOT NULL,
	[Receivables] [nchar](2) NOT NULL,
	[UserCode] [nchar](2) NOT NULL,
	[MiscCode3] [nchar](2) NOT NULL,
	[Employee] [nchar](2) NOT NULL,
	[SubledgerInactiveCode] [nchar](2) NOT NULL,
	[StartEffectiveDate] [datetime2](3) NOT NULL,
	[RelatedAddressNumber1] [int] NOT NULL,
	[RelatedAddressNumber2] [int] NOT NULL,
	[RelatedAddressNumber3] [int] NOT NULL,
	[RelatedAddressNumber4] [int] NOT NULL,
	[RelatedAddressNumber5] [int] NOT NULL,
	[FactorSpecialPayee] [int] NOT NULL,
	[Category01Code] [nchar](6) NOT NULL,
	[Category01] [nchar](60) NOT NULL,
	[Category02Code] [nchar](6) NOT NULL,
	[Category02] [nchar](60) NOT NULL,
	[Category03Code] [nchar](6) NOT NULL,
	[Category03] [nchar](60) NOT NULL,
	[Category04Code] [nchar](6) NOT NULL,
	[Category04] [nchar](60) NOT NULL,
	[Category05Code] [nchar](6) NOT NULL,
	[Category05] [nchar](60) NOT NULL,
	[Category06Code] [nchar](6) NOT NULL,
	[Category06] [nchar](60) NOT NULL,
	[Category07Code] [nchar](6) NOT NULL,
	[Category07] [nchar](60) NOT NULL,
	[Category08Code] [nchar](6) NOT NULL,
	[Category08] [nchar](60) NOT NULL,
	[Category09Code] [nchar](6) NOT NULL,
	[Category09] [nchar](60) NOT NULL,
	[Category10Code] [nchar](6) NOT NULL,
	[Category10] [nchar](60) NOT NULL,
	[Category11Code] [nchar](6) NOT NULL,
	[Category11] [nchar](60) NOT NULL,
	[Category12Code] [nchar](6) NOT NULL,
	[Category12] [nchar](60) NOT NULL,
	[Category13Code] [nchar](6) NOT NULL,
	[Category13] [nchar](60) NOT NULL,
	[Category14Code] [nchar](6) NOT NULL,
	[Category14] [nchar](60) NOT NULL,
	[Category15Code] [nchar](6) NOT NULL,
	[Category15] [nchar](60) NOT NULL,
	[Category16Code] [nchar](6) NOT NULL,
	[Category16] [nchar](60) NOT NULL,
	[Category17Code] [nchar](6) NOT NULL,
	[Category17] [nchar](60) NOT NULL,
	[Category18Code] [nchar](6) NOT NULL,
	[Category18] [nchar](60) NOT NULL,
	[Category19Code] [nchar](6) NOT NULL,
	[Category19] [nchar](60) NOT NULL,
	[Category20Code] [nchar](6) NOT NULL,
	[Category20] [nchar](60) NOT NULL,
	[Category21Code] [nchar](6) NOT NULL,
	[Category21] [nchar](60) NOT NULL,
	[Category22Code] [nchar](6) NOT NULL,
	[Category22] [nchar](60) NOT NULL,
	[Category23Code] [nchar](6) NOT NULL,
	[Category23] [nchar](60) NOT NULL,
	[Category24Code] [nchar](6) NOT NULL,
	[Category24] [nchar](60) NOT NULL,
	[Category25Code] [nchar](6) NOT NULL,
	[Category25] [nchar](60) NOT NULL,
	[Category26Code] [nchar](6) NOT NULL,
	[Category26] [nchar](60) NOT NULL,
	[Category27Code] [nchar](6) NOT NULL,
	[Category27] [nchar](60) NOT NULL,
	[Category28Code] [nchar](6) NOT NULL,
	[Category28] [nchar](60) NOT NULL,
	[Category29Code] [nchar](6) NOT NULL,
	[Category29] [nchar](60) NOT NULL,
	[Category30Code] [nchar](6) NOT NULL,
	[Category30] [nchar](60) NOT NULL,
	[GLBankAccount] [nchar](16) NOT NULL,
	[TimeScheduledIn] [int] NOT NULL,
	[DateScheduledIn] [datetime2](3) NOT NULL,
	[MessageClearedYN] [nchar](2) NOT NULL,
	[Remark] [nchar](60) NOT NULL,
	[Certificate] [nchar](40) NOT NULL,
	[EuropeanIndividualTaxID] [nchar](40) NOT NULL,
	[SecondaryAlphaName] [nchar](80) NOT NULL,
	[UserReservedCode] [nchar](4) NOT NULL,
	[UserReservedDate] [datetime2](3) NOT NULL,
	[UserReservedAmount] [decimal](20, 7) NOT NULL,
	[UserReservedNumber] [int] NOT NULL,
	[UserReservedReference] [nchar](30) NOT NULL,
	[UserID] [nchar](20) NOT NULL,
	[ProgramID] [nchar](20) NOT NULL,
	[DateUpdated] [datetime2](3) NOT NULL,
	[WorkStationID] [nchar](20) NOT NULL,
	[PurgeFlag] [nchar](2) NOT NULL,
	[ShortcutClientType] [nchar](4) NOT NULL,
	[LastTimeUpdated] [int] NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime2](3) NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime2](3) NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime2](3) NOT NULL,
	[PurgeDate] [datetime2](3) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[AddressNumber] ASC,
	[SearchTypeCode] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 10) ON [PRIMARY]
) ON [PRIMARY]





CREATE TABLE YCDEV.[JDEAPSupplierMasterYCHOI](
	[SourceID] [int] NOT NULL,
	[Source] [char](20) NOT NULL,
	[AddressNumber] [int] NOT NULL,
	[GLClass] [char](4) NOT NULL,
	[BusinessUnitAPDefault] [char](12) NOT NULL,
	[ObjectAccountsPayableDefault] [char](6) NOT NULL,
	[SubsidiaryAccountsPayableDef] [char](8) NOT NULL,
	[DocumentCompanyAPModelDocument] [char](5) NOT NULL,
	[DocumentAPDefaultforModelJE] [int] NOT NULL,
	[DocumentTypeAPDefaultModelJE] [char](2) NOT NULL,
	[CurrencyCodeAccountsPayable] [char](3) NOT NULL,
	[TaxRateArea2] [char](10) NOT NULL,
	[TaxExplCode2] [char](2) NOT NULL,
	[HoldPaymentCode] [char](1) NOT NULL,
	[TaxArea3Withholding] [char](10) NOT NULL,
	[TaxExplCode3Withholding] [char](2) NOT NULL,
	[TaxAuthorityforAPWithholding] [int] NOT NULL,
	[WithholdingPercent] [decimal](20, 7) NOT NULL,
	[PaymentTermsAP] [char](3) NOT NULL,
	[MultiplePayments] [char](1) NOT NULL,
	[PaymentInstrument] [char](1) NOT NULL,
	[ApproverNumber] [int] NOT NULL,
	[PreNoteCode] [char](1) NOT NULL,
	[FloatDaysforPayments] [int] NOT NULL,
	[LedgerInquirySequence] [char](1) NOT NULL,
	[CurrencyCodeABAmounts] [char](3) NOT NULL,
	[AmountVoucheredYTD] [decimal](20, 7) NOT NULL,
	[AmountVoucheredPYE] [decimal](20, 7) NOT NULL,
	[AddressBookAmount] [decimal](20, 7) NOT NULL,
	[AddressBookAmount01] [decimal](20, 7) NOT NULL,
	[AmountOpenOrder] [decimal](20, 7) NOT NULL,
	[MinimumOrderValue] [decimal](15, 0) NOT NULL,
	[MaximumOrderValue] [decimal](15, 0) NOT NULL,
	[RelatedAddressNumber] [int] NOT NULL,
	[BillingAddressType] [char](1) NOT NULL,
	[CustomerPricingRule] [char](8) NOT NULL,
	[OrderTemplate] [char](8) NOT NULL,
	[PrintMessage] [char](10) NOT NULL,
	[HoldOrdersCode] [char](2) NOT NULL,
	[RouteCode] [char](3) NOT NULL,
	[StopCode] [char](3) NOT NULL,
	[ZoneNumber] [char](3) NOT NULL,
	[CarrierCode] [int] NOT NULL,
	[PreferredCarrierSales] [int] NOT NULL,
	[DeliveryInstructions01] [char](30) NOT NULL,
	[DeliveryInstructions02] [char](30) NOT NULL,
	[LeadTimeTransitDays] [int] NOT NULL,
	[FreightHandlingCode] [char](3) NOT NULL,
	[InvoiceCopies] [int] NOT NULL,
	[PricePickList] [char](1) NOT NULL,
	[WeightDisplayedUOM] [char](2) NOT NULL,
	[VolumeDisplayedUOM] [char](2) NOT NULL,
	[PurchasingCategory05Code] [char](3) NOT NULL,
	[BatchProcessingMode] [char](1) NOT NULL,
	[CustomerTypeIdentifier] [char](1) NOT NULL,
	[ItemTypeIdentifier] [char](1) NOT NULL,
	[QuantityDecimals] [int] NOT NULL,
	[AmountDecimals] [int] NOT NULL,
	[FutureUse01] [char](1) NOT NULL,
	[FutureUse02] [char](1) NOT NULL,
	[SupplierParentRebatelevel] [char](1) NOT NULL,
	[SupplierRebateCode] [char](1) NOT NULL,
	[SpecialInstruction03] [char](1) NOT NULL,
	[SpecialInstruction04] [char](1) NOT NULL,
	[SpecialInstruction05] [char](1) NOT NULL,
	[MinimumCheckAmountCode] [char](1) NOT NULL,
	[Owner] [char](1) NOT NULL,
	[RevenueNettedYN] [char](1) NOT NULL,
	[UserReservedCode] [char](2) NOT NULL,
	[UserReservedDate] [datetime] NOT NULL,
	[UserReservedAmount] [decimal](20, 7) NOT NULL,
	[UserReservedNumber] [int] NOT NULL,
	[UserReservedReference] [char](15) NOT NULL,
	[UserID] [char](10) NOT NULL,
	[ProgramID] [char](10) NOT NULL,
	[WorkStationID] [char](10) NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[LastTimeUpdated] [int] NOT NULL,
	[AdjustmentSchedule] [char](8) NOT NULL,
	[SendMethod] [char](1) NOT NULL,
	[EvaluatedReceipt] [char](1) NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
	[AutomationRule] [char](2) NULL,
 CONSTRAINT [PK_JDEAPSupplierMaster] PRIMARY KEY CLUSTERED 
(
	[AddressNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO




CREATE TABLE YCDEV.[Star_SupplierYCHOI](
	[SupplierNumberID] [char](20) NOT NULL,
	[SourceID] [int] NOT NULL,
	[Source] [char](20) NOT NULL,
	[SupplierNumber] [int] NOT NULL,
	[SupplierName] [char](40) NOT NULL,
	[SupplierAddressLine01] [char](40) NOT NULL,
	[SupplierAddressLine02] [char](40) NOT NULL,
	[SupplierAddressLine03] [char](40) NOT NULL,
	[SupplierAddressLine04] [char](40) NOT NULL,
	[SupplierPostalCode] [char](12) NOT NULL,
	[SupplierCity] [char](25) NOT NULL,
	[SupplierCounty] [char](25) NOT NULL,
	[SupplierStateCode] [char](3) NOT NULL,
	[SupplierState] [char](30) NOT NULL,
	[SupplierCountry] [char](30) NOT NULL,
	[SupplierCountryCode] [char](3) NOT NULL,
	[ParentNumber] [int] NOT NULL,
	[ParentName] [char](40) NOT NULL,
	[ParentAddressLine01] [char](40) NOT NULL,
	[ParentAddressLine02] [char](40) NOT NULL,
	[ParentAddressLine03] [char](40) NOT NULL,
	[ParentAddressLine04] [char](40) NOT NULL,
	[ParentPostalCode] [char](12) NOT NULL,
	[ParentCity] [char](25) NOT NULL,
	[ParentCounty] [char](25) NOT NULL,
	[ParentStateCode] [char](3) NOT NULL,
	[ParentState] [char](30) NOT NULL,
	[ParentCountry] [char](30) NOT NULL,
	[ParentCountryCode] [char](3) NOT NULL,
	[SupplierParentRebatelevel] [char](1) NOT NULL,
	[SupplierRebateCode] [char](1) NOT NULL,
	[CustomerTypeIdentifier] [char](1) NOT NULL,
	[HoldOrdersCode] [char](2) NOT NULL,
	[RouteCode] [char](3) NOT NULL,
	[StopCode] [char](3) NOT NULL,
	[ZoneNumber] [char](3) NOT NULL,
	[CarrierCode] [int] NOT NULL,
	[GLClass] [char](4) NOT NULL,
	[PaymentInstrument] [char](1) NOT NULL,
	[ApproverNumber] [int] NOT NULL,
	[PaymentTermsAP] [char](3) NOT NULL,
	[PaymentTerms] [char](30) NOT NULL,
	[RelatedAddressNumber] [int] NOT NULL,
	[SearchTypeCode] [char](3) NOT NULL,
	[SearchType] [char](30) NOT NULL,
	[Category01Code] [char](3) NOT NULL,
	[Category01] [varchar](255) NOT NULL,
	[Category02Code] [char](3) NOT NULL,
	[Category02] [varchar](255) NOT NULL,
	[Category03Code] [char](3) NOT NULL,
	[Category03] [varchar](255) NOT NULL,
	[Category04Code] [char](3) NOT NULL,
	[Category04] [varchar](255) NOT NULL,
	[Category05Code] [char](3) NOT NULL,
	[Category05] [varchar](255) NOT NULL,
	[Category06Code] [char](3) NOT NULL,
	[Category06] [varchar](255) NOT NULL,
	[Category07Code] [char](3) NOT NULL,
	[Category07] [varchar](255) NOT NULL,
	[Category08Code] [char](3) NOT NULL,
	[Category08] [varchar](255) NOT NULL,
	[Category09Code] [char](3) NOT NULL,
	[Category09] [varchar](255) NOT NULL,
	[Category10Code] [char](3) NOT NULL,
	[Category10] [varchar](255) NOT NULL,
	[Category11Code] [char](3) NOT NULL,
	[Category11] [varchar](255) NOT NULL,
	[Category12Code] [char](3) NOT NULL,
	[Category12] [varchar](255) NOT NULL,
	[Category13Code] [char](3) NOT NULL,
	[Category13] [varchar](255) NOT NULL,
	[Category14Code] [char](3) NOT NULL,
	[Category14] [varchar](255) NOT NULL,
	[Category15Code] [char](3) NOT NULL,
	[Category15] [varchar](255) NOT NULL,
	[Category16Code] [char](3) NOT NULL,
	[Category16] [varchar](255) NOT NULL,
	[Category17Code] [char](3) NOT NULL,
	[Category17] [varchar](255) NOT NULL,
	[Category18Code] [char](3) NOT NULL,
	[Category18] [varchar](255) NOT NULL,
	[Category19Code] [char](3) NOT NULL,
	[Category19] [varchar](255) NOT NULL,
	[Category20Code] [char](3) NOT NULL,
	[Category20] [varchar](255) NOT NULL,
	[Category21Code] [char](10) NOT NULL,
	[Category21] [varchar](255) NOT NULL,
	[Category22Code] [char](10) NOT NULL,
	[Category22] [varchar](255) NOT NULL,
	[Category23Code] [char](10) NOT NULL,
	[Category23] [varchar](255) NOT NULL,
	[Category24Code] [char](10) NOT NULL,
	[Category24] [varchar](255) NOT NULL,
	[Category25Code] [char](10) NOT NULL,
	[Category25] [varchar](255) NOT NULL,
	[Category26Code] [char](10) NOT NULL,
	[Category26] [varchar](255) NOT NULL,
	[Category27Code] [char](10) NOT NULL,
	[Category27] [varchar](255) NOT NULL,
	[Category28Code] [char](10) NOT NULL,
	[Category28] [varchar](255) NOT NULL,
	[Category29Code] [char](10) NOT NULL,
	[Category29] [varchar](255) NOT NULL,
	[Category30Code] [char](10) NOT NULL,
	[Category30] [varchar](255) NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
	[PersonCorpTaxPayerCode] [char](1) NULL,
	[SupplierLongAddressNumber] [char](20) NULL,
	[ParentLongAddressNumber] [char](20) NULL,
	[ParentStdIndustCode] [char](20) NULL,
	[ParentStdIndustDesc] [varchar](255) NULL,
	[SupplierStdIndustCode] [char](20) NULL,
	[SupplierStdIndustDesc] [varchar](255) NULL,
 CONSTRAINT [PK_Star_Supplier] PRIMARY KEY CLUSTERED 
(
	[SupplierNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO

